//bind validation to registration form
$(document).ready(function () {
    $("#accountform").validate({
        rules: {
            email: {
                required: true,
                email: true,
                maxlength: 75
            },
            username: {
                required: true,
                minlength: 3,
                maxlength: 30
            },
            password: {
                required: true
            },
            firstname: {
                required: true,
                maxlength: 30
            },
            lastname: {
                required: true,
                maxlength: 30
            },
            street_address: {
                required: true,
                maxlength: 255
            },
            postal_code: {
                required: true,
                number: true,
                maxlength: 10,
                minlength: 4
            },
            city: {
                required: true,
                maxlength: 50
            },
            country: {
                required: true,
                maxlength: 50
            },
            phonenumber: {
                required: true,
                maxlength: 20
            }
        }
    });
});
